package nix.spring.domain;

public class Person {

	private String name;
	private Integer age;

	private Car car;

	public Person(String name, Car car) {
		super();
		this.name = name;
		this.car = car;
	}

	public Person(Car car, String name) {
		super();
		this.name = name;
		this.car = car;
	}

	public Person(Integer name, Car car) {
		super();
		this.name = Integer.toString(name);
		this.car = car;
	}

	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public void init() {
		System.out.println("init()...");
	}

	public void destroy() {
		System.out.println("destroy()...");
	}

	public Person() {
		System.out.println("空参构造...");
	}

	@Override
	public String toString() {
		return "Person [name=" + name + ", age=" + age + ", car=" + car + "]";
	}
}
